package com.sright.bcard.content.biz.service;

import com.sright.bcard.content.biz.manager.CardSettingManager;
import com.sright.bcard.common.service.share.dto.content.CardSettingDTO;
import com.sright.bcard.content.share.request.ShareImageParamRequest;
import com.sright.bcard.content.share.service.CardSettingService;
import com.sright.common.response.SrightResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class CardSettingServiceImpl implements CardSettingService {

    @Autowired
    private CardSettingManager cardSettingManager;

    @Override
    public SrightResponse<CardSettingDTO> getSetting(Long userId) {
        return SrightResponse.defaultSuccess(cardSettingManager.getSetting(userId));
    }

    @Override
    public SrightResponse setimg(ShareImageParamRequest shareImageParamRequest) {
        return SrightResponse.defaultSuccess(cardSettingManager.setimg(shareImageParamRequest));
    }

    @Override
    public SrightResponse userSetting(CardSettingDTO cardSettingDTO) {
        return SrightResponse.defaultSuccess(cardSettingManager.userSetting(cardSettingDTO));
    }

    @Override
    public SrightResponse setMobile(String mobile, Long memberId) {
        return SrightResponse.defaultSuccess(cardSettingManager.setMobile(mobile,memberId));
    }
}
